package son.hut.vn;

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class CreateMarker extends FragmentActivity{
	private GoogleMap googleMap;
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.marker);
		
		googleMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
		
		
		//add marker dang chuan
		googleMap.addMarker(new MarkerOptions().
				position(new LatLng(21.787878, 105.787878)).
				title("Standard").snippet("Hehe").
				icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));
		
		
		//add marker dang custom
		googleMap.addMarker(new MarkerOptions().
				position(new LatLng(21.000000, 105.999999)).
				title("Custom").snippet("Hihi").
				icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher)));
	}

}
